/*-------------------------------------------------------- 
* Module Name : OLMainWindow
* Version : 1.0
* 
* Software Name : Qt App Template
* Version : 1.0
*
* Copyright � 2010 � 2011 France T�l�com
* This software is distributed under the LGPL v2.1 license,
* the text of which is available at http://www.gnu.org/licenses/lgpl-2.1.html
* or see the "LICENSE.txt" file for more details.
*
*--------------------------------------------------------
* File Name   : OLMainWindow.h
*
* Created     : 07 June 2011
* Author(s)   : Omer Saleem
*
* Description :
* Object that manages the platform differences for screen
* handling. Also, provides the screen orientation support.
*
*--------------------------------------------------------
* 1.0 - First open source release
*
*/

#ifndef OLMAINWINDOW_H
#define OLMAINWINDOW_H

#include <QWidget>

#include "OLApplication.h"

class OLMainWindow : public QWidget
{
Q_OBJECT
public:
    explicit OLMainWindow(QWidget *parent = 0);

    void setOrientation(OLApplication::OrientationOptions option);
    OLApplication::OrientationOptions orientation() const;

    void showMainWindow();
    
protected:
    void resizeEvent(QResizeEvent * event);

signals:
    void handleResize();
    void handlePortraitSwitch();
    void handleLandscapeSwitch();

private:
    OLApplication::OrientationOptions m_systemOption;
    OLApplication::OrientationOptions m_currentOption;
};

#endif // OLMAINWINDOW_H
